package cn.edu.service.impl;

import cn.edu.dao.BookDao;
import cn.edu.service.BookService;

/**
 * @author Davey chan
 */
public class BookServiceImpl implements BookService {
//    删除业务层中使用new方法来创建的对象
    private BookDao bookDao;//不能new一个对象
    public void save(){
        System.out.println("book service save...");
      bookDao.save();
    }

    public BookServiceImpl(BookDao bookDao) {
        this.bookDao = bookDao;
    }

    //提供对应的set方法
    public void setBookDao(BookDao bookDao) {
        this.bookDao = bookDao;
    }
}
